<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="description" content="Responsive Admin Dashboard Template">
        <meta name="keywords" content="admin,dashboard">
        <meta name="author" content="skcats">
        <!-- The above 6 meta tags *must* come first in the head; any other head content must come *after* these tags -->
        
        <!-- Title -->
        <title>Home</title>

        <!-- Styles -->
        <link href="https://fonts.googleapis.com/css?family=Ubuntu" rel="stylesheet">
        <link href="/houtai/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet">
        <link href="/houtai/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet">
        <link href="/houtai/plugins/icomoon/style.css" rel="stylesheet">
        <link href="/houtai/plugins/uniform/css/default.css" rel="stylesheet"/>
        <link href="/houtai/plugins/switchery/switchery.min.css" rel="stylesheet"/>
        <link href="/houtai/plugins/nvd3/nv.d3.min.css" rel="stylesheet">
      
        <!-- Theme Styles -->
        <link href="/houtai/css/ecaps.min.css" rel="stylesheet">
        <link href="/houtai/css/custom.css" rel="stylesheet">

        <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
        <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
        <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
        <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
        <![endif]-->
        <style>
            th{
                font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
                font-weight: bold;
                text-align: center;
            }
            td{
                text-align: center;
            }
            .pager-header{

            }

            .pager-header .header-info{
                float:left;
            }

            .pager-header .header-info .info-number{
                font-weight:bold;
            }

            .pager-header .header-nav{
                float:right;
            }

            .pager-header .header-nav .nav-number{
                width:30px;
                margin:0 5px;
            }
        </style>
    </head>
    <body>
        
        <!-- Page Container -->
        <div class="page-container">

            <!-- /Page Sidebar -->
            <#include 'page-sidebar.ftl'>
            <!-- Page Content -->


            <div class="page-content">

                <!-- Page Header -->
                <#include 'page-header.ftl'>
                <!-- /Page Header -->
                <!-- Page Inner -->
                <div class="page-inner">
                    <div class="page-title">
                        <h3 class="breadcrumb-header">搜索员工</h3>
                    </div>
                    <div id="main-wrapper">
                        <div class="row">
                            <div class="col-md-12">
                                <div class="panel panel-white">
                                    <form action="/admin/searchemployees" method="get">
                                        <div class="form-group">
                                            <label for="exampleInputEmail1">姓名</label>
                                            <input name="employeeName" type="text" id="employeename" class="form-control"
                                                   value="<#if employee??>${employee.employeeName!''}</#if>" maxlength="20"/>
                                        </div>
                                        <div class="form-group">
                                            <label for="exampleInputPassword1">用户名</label>
                                            <input name="username" type="text" id="accountname" class="form-control"
                                                   value="<#if employee??>${employee.username!''}</#if>" maxlength="20"/>
                                        </div>
                                        <div class="form-group">
                                            <label for="exampleInputPassword1">状态：</label>
                                            <#if employee??>
                                                <#if employee.status == 0>
                                                    <input type="radio" id="status" name="status" value="1"/><label>已批准</label>
                                                    <input checked="checked" type="radio" id="status" name="status" value="0"/>
                                                    <label>待审批</label>
                                                    <input type="radio" id="status" name="status" value="2"/><label>已关闭</label>
                                                <#elseif employee.status == 1>
                                                    <input checked="checked" type="radio" id="status" name="status" value="1"/>
                                                    <label>已批准</label>
                                                    <input type="radio" id="status" name="status" value="0"/>
                                                    <label>待审批</label>
                                                    <input type="radio" id="status" name="status" value="2"/><label>已关闭</label>
                                                <#elseif employee.status == 2>
                                                    <input type="radio" id="status" name="status" value="1"/>
                                                    <label>已批准</label>
                                                    <input type="radio" id="status" name="status" value="0"/>
                                                    <label>待审批</label>
                                                    <input checked="checked" type="radio" id="status" name="status" value="2"/>
                                                    <label>已关闭</label>
                                                </#if>
                                            <#else >
                                                <input type="radio" id="status" name="status" value="1"
                                                       checked="checked"/><label>已批准</label>
                                                <input type="radio" id="status" name="status" value="0"/><label>待审批</label>
                                                <input type="radio" id="status" name="status" value="2"/><label>已关闭</label>
                                            </#if>
                                        </div>

                                        <input type="submit" class="btn btn-primary" value="查询">
                                        <input type="reset" class="btn btn-success" value="重置">
                                    </form>
                                </div>
                            </div>
                            <div class="col-md-12">
                                <div class="panel panel-white">
                                    <div class="panel-heading clearfix">
                                        <h4 class="panel-title">查询结果</h4>
                                    </div>
                                    <div class="panel-body">
                                        <div class="table-responsive">
                                            <table class="table table-bordered">
                                                <thead>
                                                <tr>
                                                    <th>姓名</th>
                                                    <th>账号名</th>
                                                    <th>联系电话</th>
                                                    <th>电子邮件</th>
                                                    <th>操作</th>
                                                </tr>
                                                </thead>
                                                <tbody>
                                                    <#if emps??>
                                                        <#list emps as emp>
                                                            <tr>
                                                                <td>${emp.employeeName}</td>
                                                                <td>${emp.username}</td>
                                                                <td>${emp.phone}</td>
                                                                <td>${emp.email}</td>
                                                                <td>
                                                                    <a class="btn btn-danger" href="/admin/updateemp?id=${emp.employeeId}">关闭账号</a>
                                                                </td>
                                                            </tr>
                                                        </#list>
                                                    </#if>
                                                </tbody>
                                            </table>
                                        </div>
                                        <div class="pager-header">
                                            <div class="header-info">
                                                共<span class="info-number">${total}</span>条结果，
                                                分成<span class="info-number">${pagenum}</span>页显示，
                                                当前第<span class="info-number">${page}</span>页
                                            </div>
                                            <div class="header-nav">
                                                <a type="button" class="clickbutton" href="/admin/searchemployees?status=${employee.status}&page=1">首页</a>
                                                <a type="button" class="clickbutton"
                                                   href="/admin/searchemployees?status=${employee.status}&page=${page-1}">上页</a>
                                                <a type="button" class="clickbutton"
                                                   href="/admin/searchemployees?status=${employee.status}&page=${page+1}">下页</a>
                                                <a type="button" class="clickbutton"
                                                   href="/admin/searchemployees?status=${employee.status}&page=${pagenum}">末页</a>
                                                <form action="/admin/searchemployees"
                                                      style="display: inline"
                                                      method="get">
                                                    <input type="hidden" name="status" value="${employee.status}">
                                                    跳到第<input name="page" type="text" id="pagenum" class="nav-number"/>页
                                                    <input type="submit" class="clickbutton" value="跳转"/>
                                                </form>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div><!-- Row -->
                    </div><!-- Main Wrapper -->
                    <div class="page-footer">
                        <p>Copyright &copy; 2021.Writer name JQueryZK.</p>
                    </div>


            </div><!-- /Page Content -->
        </div><!-- /Page Container -->
        
        
        <!-- Javascripts -->
        <script src="/houtai/plugins/jquery/jquery-3.1.0.min.js"></script>
        <script src="/houtai/plugins/bootstrap/js/bootstrap.min.js"></script>
        <script src="/houtai/plugins/jquery-slimscroll/jquery.slimscroll.min.js"></script>
        <script src="/houtai/plugins/uniform/js/jquery.uniform.standalone.js"></script>
        <script src="/houtai/plugins/switchery/switchery.min.js"></script>
        <script src="/houtai/plugins/d3/d3.min.js"></script>
        <script src="/houtai/plugins/nvd3/nv.d3.min.js"></script>
        <script src="/houtai/plugins/flot/jquery.flot.min.js"></script>
        <script src="/houtai/plugins/flot/jquery.flot.time.min.js"></script>
        <script src="/houtai/plugins/flot/jquery.flot.symbol.min.js"></script>
        <script src="/houtai/plugins/flot/jquery.flot.resize.min.js"></script>
        <script src="/houtai/plugins/flot/jquery.flot.tooltip.min.js"></script>
        <script src="/houtai/plugins/flot/jquery.flot.pie.min.js"></script>
        <script src="/houtai/plugins/chartjs/chart.min.js"></script>
        <script src="/houtai/js/ecaps.min.js"></script>
        <script src="/houtai/js/pages/dashboard.js"></script>

        </div>

</body>
</html>